/*
 * @Description: 检测计划设置字典及枚举
 * @Author: Rfan
 * @Date: 2022-10-13 18:39:23
 * @LastEditTime: 2023-03-04 14:35:48
 */

/**
 * 接收方式枚举
 */
export enum EnumReceiveTypes {
  // 1.	条目与原文导入
  // 2.	光盘格式包导入
  // 3.	SIP格式包导入
  // 4.	DBF数据库导入

  Excel = 1,
  CD,
  SIP,
  DBF,
  ZIP
}
// 接收方式列表
export const receiveTypeList = [
  { id: EnumReceiveTypes.Excel, name: '条目与原文' },
  { id: EnumReceiveTypes.CD, name: '光盘格式包' },
  { id: EnumReceiveTypes.SIP, name: 'SIP格式包' },
  { id: EnumReceiveTypes.DBF, name: 'DBF数据库' },
  { id: EnumReceiveTypes.ZIP, name: 'ZIP格式包' }
];

/**
 * 接收类型枚举
 */
export enum EnumReceiveWays {
  // 1.	电子档案接收
  // 2.	数字化副本接收
  // 3.	数据资源接收
  // 4.	政府公开信息接收
  // 5.	数据库接收
  // 6.	在线接收

  ElectronicRecord = 1,
  DigitalCopy,
  DigitalResource,
  Public,
  DB,
  Online
}
// 接收类型列表
export const receiveWaysList = [
  {
    id: EnumReceiveWays.ElectronicRecord,
    name: '电子档案接收',
    types: [EnumReceiveTypes.Excel, EnumReceiveTypes.CD, EnumReceiveTypes.SIP, EnumReceiveTypes.ZIP]
  },
  {
    id: EnumReceiveWays.DigitalCopy,
    name: '数字化副本接收',
    types: [EnumReceiveTypes.Excel, EnumReceiveTypes.CD, EnumReceiveTypes.SIP]
  },
  { id: EnumReceiveWays.DigitalResource, name: '数据资源接收', types: [EnumReceiveTypes.Excel] },
  { id: EnumReceiveWays.Public, name: '政府公开信息接收', types: [EnumReceiveTypes.Excel] },
  { id: EnumReceiveWays.DB, name: '数据库接收', types: [EnumReceiveTypes.DBF] }
];

// 接收状态列表
/**
 * 接收类型枚举
 */
export enum EnumStatus {
  // 0. 待上传
  // 1. 待接收
  // 2. 待检测
  // 3. 检测中
  // 4. 检测失败
  // 5. 待审核
  // 6. 审核中
  // 7. 审核失败
  // 8. 待入库
  // 9. 入库中
  // 10. 入库失败
  // 11. 接收完成
  // 12. 待退回
  // 13. 已退回

  UploadPending,
  AccessionPending,
  DetectionPending,
  Detecting,
  DetectionFailed,
  AuditPending,
  Auditing,
  AuditFailed,
  ToDBPending,
  ToDBing,
  ToDBFailed,
  AccessionComplete,
  ReturnPending,
  Returned
}

export const stateList = [
  { id: EnumStatus.UploadPending, name: '待上传' },
  { id: EnumStatus.AccessionPending, name: '待接收' },
  { id: EnumStatus.DetectionPending, name: '待检测' },
  { id: EnumStatus.Detecting, name: '检测中' },
  { id: EnumStatus.DetectionFailed, name: '检测失败' },
  { id: EnumStatus.AuditPending, name: '待审核' },
  { id: EnumStatus.Auditing, name: '审核中' },
  { id: EnumStatus.AuditFailed, name: '审核失败' },
  { id: EnumStatus.ToDBPending, name: '待入库' },
  { id: EnumStatus.ToDBing, name: '入库中' },
  { id: EnumStatus.ToDBFailed, name: '入库失败' },
  { id: EnumStatus.AccessionComplete, name: '接收完成' },
  { id: EnumStatus.ReturnPending, name: '待退回' },
  { id: EnumStatus.Returned, name: '已退回' }
];
